package com.hongxing.baseaar.base

import androidx.core.app.ActivityCompat
import androidx.viewbinding.ViewBinding

abstract class BaseMvpFragment<VB : ViewBinding, P : BasePresenter> : BaseFragment<VB>() {
    lateinit var presenter: P
    override fun initView() {
        presenter = getBaseMvpFragmentPresenter()
    }

    abstract fun getBaseMvpFragmentPresenter(): P

    open fun getColorRes(color: Int): Int {
        return ActivityCompat.getColor(requireContext(), color)
    }
}